package com.springsource;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.io.Resource;

import java.util.Locale;

@SpringBootApplication
public class A01Application {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(A01Application.class, args);
        String hi = context.getMessage("hi", null, Locale.ENGLISH);
        System.out.println(hi);
        Resource resource = context.getResource("classpath:1.txt");
        boolean exists = resource.exists();
        System.out.println(exists);
        System.out.println(resource);
    }
}
